<?php
/**
 * 公众号服务器消息测试类
 *
 * @author Zeon <scplay@gmail.com>
 * @date 2018/7/20
 * @copyright PanxSoft Inc.
 */
namespace App\Http\Requests\OpenWechat;

use App\Http\Requests\ApiRequest;

/**
 * Class ServerRequest
 *
 * @property string|null debug
 *
 */
class ServerRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            /* 这里不要写任何规则，也不要删除 rules */
        ];
    }

    public function isDebug(): bool
    {
        return $this->has('debug');
    }

    public function fakeMessage(): array
    {
        return $this->all();
    }
}
